package com.yst.metho.web.application.user;

import nextapp.echo2.app.Column;
import nextapp.echo2.app.Extent;
import nextapp.echo2.app.Grid;
import nextapp.echo2.app.Insets;
import nextapp.echo2.app.Label;
import nextapp.echo2.app.PasswordField;

/**
 * Vue qui permet de changer le mot de passe de l'utilisateur connecte.
 * 
 * @author perso
 * 
 */
public class ChangePwdPane extends Column
{
	private PasswordField mOldPwd;

	private PasswordField mNewPwd;

	private PasswordField mNewPwdConf;

	public ChangePwdPane()
	{
		super();
		setCellSpacing(new Extent(10));
		setInsets(new Insets(10));
		Grid headerGrid = new Grid();
		headerGrid.setInsets(new Insets(0, 2));
		add(headerGrid);
		Label label;
		label = new Label("Ancien mot de passe");
		headerGrid.add(label);
		mOldPwd = new PasswordField();
		mOldPwd.setStyleName("TextField");
		headerGrid.add(mOldPwd);
		label = new Label("Nouveau mot de passe");
		headerGrid.add(label);
		mNewPwd = new PasswordField();
		mNewPwd.setStyleName("TextField");
		headerGrid.add(mNewPwd);
		label = new Label("Confirmation");
		headerGrid.add(label);
		mNewPwdConf = new PasswordField();
		mNewPwdConf.setStyleName("TextField");
		headerGrid.add(mNewPwdConf);
	}

	/**
	 * @return the newPwd
	 */
	public String getNewPwd()
	{
		return mNewPwd.getText();
	}

	/**
	 * @return the newPwdConf
	 */
	public String getNewPwdConf()
	{
		return mNewPwdConf.getText();
	}

	/**
	 * @return the oldPwd
	 */
	public String getOldPwd()
	{
		return mOldPwd.getText();
	}

}
